package com.itheima.test17;

import java.util.*;
//25
public class Demo {
    public static void main(String[] args) {
        HashMap<String, ArrayList<String>> map = new HashMap<>();
        ArrayList<String> list1 = new ArrayList<>();
        Collections.addAll(list1, "诸葛亮", "赵云");
        ArrayList<String> list2 = new ArrayList<>();
        Collections.addAll(list2, "唐僧", "孙悟空");
        ArrayList<String> list3 = new ArrayList<>();
        Collections.addAll(list3, "武松", "鲁智深");
        map.put("三国演义", list1);
        map.put("西游记", list2);
        map.put("水浒传", list3);


        Set<String> strings = map.keySet();
        for (String bookName : strings) {
            System.out.println(bookName);
            ArrayList<String> list = map.get(bookName);
            System.out.println("\t" + list.get(0));
            System.out.println("\t" + list.get(1));
            /* System.out.println("\t"+map.get(bookName));*/
        }
    }
}
